home *** CD-ROM | disk | FTP | other *** search
- Path: oxy.rust.net!usenet
- From: ebennett@rust.net
- Newsgroups: comp.lang.c++
- Subject: Re: Using a Base constructor for a derived class
- Date: Wed, 17 Jan 1996 05:58:16 GMT
- Organization: Rust Net - High Speed Internet in Detroit 810-642-2276
- Message-ID: <4dhoio$ioj@oxy.rust.net>
- References: <4ddui9$a14@felix.cc.gatech.edu>
- NNTP-Posting-Host: liv-10.rust.net
- X-Newsreader: Forte Free Agent 1.0.82
-
- culbreth@cc.gatech.edu (Matthew W. Culbreth) wrote:
-
- >Howdy,
-
- >I have a base class with a constructor. This class is never used
- >in my application. I have three classes derived from this class.
-
- >When I create an instant of one of the derived class, I want to use the
- >constructor from the base class. The compiler is stating that it can't find
- >the constructor for the arguments passed for any of the derived classes.
- >Are constructors inherited the same as member functions?
-
- No, constructors are not virtual. If you want to create an instance
- of a derived class passing arguments, then you must define a
- constructor in the derived class which expects those arguments.
-
- Earl
-
-
-